import axios from '@/utils/request'

export function getCategory(id) {
  return axios({
    url: '/category',
    method: 'get',
    params: { id },
  })
}
export function getCategoryFilterAPI(id) {
  return axios({
    url: '/category/sub/filter',
    method: 'get',
    params: {
      id,
    },
  })
}
export function getSubCategoryAPI(data) {
  return axios({
    url: '/category/goods/temporary',
    method: 'POST',
    data,
  })
}
export function getSearch(data) {
  return axios({
    url: '/search/all',
    method: 'POST',
    data,
  })
}
